package innerClassTest;

public class Outer {
    private int outersum;
    public void outershow(){
        System.out.println("outershow");
    }

    public Outer() {
    }

    public Outer(Outer o) {
        outersum=o.outersum;
    }

    public Outer(int outersum) {
        this.outersum = outersum;
    }

    public Inner getInner(int innersum){
        return new Inner(innersum);
    }
    public Inner getInner(){
        return new Inner();
    }

    public int getOutersum() {
        return outersum;
    }

    public void setOutersum(int outersum) {
        this.outersum = outersum;
    }

    public class Inner{
        private int innersum;

        public Inner() {
        }

        public Inner(int innersum) {
            this.innersum = innersum;
        }

        public void innershow(){
            System.out.println("innershow");
        }
        public Outer getOuter(){
            return Outer.this;
        }
    }
}
